package com.sofly.service.impl.group3;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sofly.dao.group3.IPurchaseListDao;
import com.sofly.entity.PurchaseList;
import com.sofly.service.group3.IPurchaseListService;

/**
 * 
* <p>Title:PurchaseListServiceImpl </p>
* <p>Description: </p>
* <p>Company: </p> 
* @author ChengShiMin
* @date 下午6:55:29
 */
@Service
public class PurchaseListServiceImpl implements IPurchaseListService {

	@Autowired
	private IPurchaseListDao purchaseListDao;
	@Override
	public List<PurchaseList> getPurchaseList(int page, int size) {
		 
		return purchaseListDao.selectPurchaseList(page, size);
	}

	@Override
	public PurchaseList getPurchase(String purchaseId) {
		 
		return purchaseListDao.selectPurchase(purchaseId);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return purchaseListDao.selectCount();
	}

	@Override
	public int addPurchaseList(PurchaseList purchaseList) {
		// TODO Auto-generated method stub
		return purchaseListDao.insertPurchaseList(purchaseList);
	}

	@Override
	public int editPurchaseList(PurchaseList purchaseList) {
		// TODO Auto-generated method stub
		return purchaseListDao.updatePurchaseList(purchaseList);
	}

	@Override
	public List<PurchaseList> getPurchaseListByDate(String saveDate, int page, int size) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectPurchaseListByDate(saveDate, page, size);
	}

	@Override
	public int getCount1(String saveDate) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectCount1(saveDate);
	}

	@Override
	public List<PurchaseList> selectPurchaseListByPrice(double minprice, double maxprice, int page, int size) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectPurchaseListByPrice(minprice, maxprice, page,size);
	}

	@Override
	public int getCount2(double minprice, double maxprice) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectCount2(minprice, maxprice);
	}

	@Override
	public List<PurchaseList> getPurchaseListByDate1(String starttime, String endtime, int page, int size) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectPurchaseListByDate1(starttime, endtime,page,size);
	}

	@Override
	public int getCount3(String starttime, String endtime) {
		// TODO Auto-generated method stub
		return purchaseListDao.selectCount3(starttime, endtime);
	}

	 

}
